namespace GrpcSampleDbAccessService.Context
{
    using Microsoft.EntityFrameworkCore;
    using GrpcSampleDbAccessService.Model;
    using Stee.CAP8.DBAccess;
    public class StudentContext : BaseDBContext
    {
        public StudentContext(DbContextOptions<StudentContext> options) : base(options) { }
        public StudentContext() : this(true) { }
        public StudentContext(bool useOracle) : this(null, useOracle) { }
        public StudentContext(string connectionString, bool useOracle = true) : base(connectionString, useOracle) { }

        public DbSet<Student> Student { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            if (modelBuilder != null)
            {
                modelBuilder.ApplyConfiguration(new BaseEntityConfiguration<Student>());
                modelBuilder.Entity<Student>().ToTable("Student");
            }
        }
    }

}
